<template>
  <!-- 新增应用 -->
  <div class="container">
    <div>
      <!-- 应用名称 -->
      <div style="display: flex">
        <div style="width: 30%"></div>
        <div>
          <div style="margin-bottom: 5px">
            <span style="color: red">*</span>
            应用名称：
          </div>
          <el-input v-model="appForm.name" />
        </div>
      </div>
      <!-- 应用介绍 -->
      <div style="display: flex; margin: 15px 0 5px">
        <div style="width: 30%"></div>
        <div style="flex-grow: 1">
          <div style="margin-bottom: 5px">
            <span style="color: white">*</span>
            应用介绍：
          </div>
          <el-input
            v-model="appForm.content"
            style="width: 50%"
            type="textarea"
          />
        </div>
      </div>
      <!-- 选择员工 -->
      <div style="display: flex">
        <div style="width: 30%"></div>
        <el-button type="text" @click="deptDialog = true">选择员工</el-button>
      </div>
    </div>
    <div class="flex_between" style="margin-top: 20px">
      <div></div>
      <el-button type="primary" @click="$emit('send')">保存</el-button>
    </div>

    <el-dialog append-to-body title="选择员工" :visible.sync="deptDialog">
      <div></div>
      <div slot="footer">
        <el-button type="primary" @click="deptDialog = false">确认</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        deptDialog: false,

        appForm: {
          name: '',
          content: '',
        },
      }
    },
  }
</script>

<style scoped>
  .flex_y_center {
    display: flex;
    align-items: center;
  }
  .flex_between {
    display: flex;
    justify-content: space-between;
  }
</style>
